<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <link rel="stylesheet" href="/layui/css/layui.css" />
</head>
<body>
<script src="/layui/layui.js"></script>
<script>
    layui.use('layer',function () {
        var layer = layui.layer;
        //prompt层新定制的成员如下


        //例子1
        layer.prompt(function(value,index, elem){
            alert(value); //得到value
            layer.close(index);
        });

        //例子2
        layer.prompt({
            formType: 2,
            value: '初始值',
            title: '请输入值',
            area: ['800px', '350px'] //自定义文本域宽高
        }, function(value, index, elem){
            alert(value); //得到value
            layer.close(index);
        });

        //列子3
        layer.tab({
            area: ['600px', '300px'],
            tab: [{
                title: 'TAB1',
                content: '内容1'
            }, {
                title: 'TAB2',
                content: '内容2'
            }, {
                title: 'TAB3',
                content: '内容3'
            }]
        });

    })
</script>
</body>
</html>